Activity Diagram for the Amazon Online Shopping System

Create some activity diagrams for the Amazon online shopping system.

Activities diagrams are a great way to visualize the flow of messages from one activity to the other in the system. There can be different activity diagrams that we can create for our Amazon online shopping system. In this lesson, we will create activity diagrams for the following two activities:

  • A customer buying a product

  • Activity challenge: The customer receives their order.

A customer buying a product#

The following are the states and actions that will be involved in this activity diagram.

States#

Initial state: The customer opens Amazon.

Final state: The customer proceeds with checkout.

Actions#

The customer opens the website. They either search or browse the website, select a product, and proceed to buy it.

The activity diagram for a customer buying a product
The activity diagram for a customer buying a product

Activity challenge: The customer receives their order#

You’ll help us in creating an activity diagram of a customer receiving their order.

A skeleton of the activity diagram is provided below.

The activity diagram for a customer receiving their order
The activity diagram for a customer receiving their order

Notice that the actions in the diagram above are numbered from 1 to 14. The slots below represent the activities, and the arrows represent the flow from one activity to the other.

Can you rearrange the slots below in the correct order they should appear in the activity diagram above?

Note: If you get stuck, just click the “Show Solution” button to check the correct answer.

Fill the missing slots with the correct actions for a customer receiving their order.

The customer lands on the checkout page

The customer is asked for a payment option

Customer selects credit card

Customer selects cash on delivery

Customer submits credit card information

The payment is confirmed?

Selected items from the customers cart are removed

The customer is shown their order summary

Shipment status is set as “Active”

Shipment status is set as “Completed”

Customer receives a notification

Cash on delivery was selected?

Customer pays the cash to delivery person

The customer receives their package


Alternatively, you can click the "Show complete diagram" button below to see the complete activity diagram.

We’ve looked at some of the activity diagrams of our Amazon online shopping system. In the next lesson, we’ll present the code for our designed classes in some of the most popular languages.

Sequence Diagram for the Amazon Online Shopping System

Code for the Amazon Online Shopping System